package com.leetcode.LC;

public class LC83 {
    public ListNode deleteDuplicates(ListNode head) {

        ListNode tmp = head;
        while (tmp != null) {
            while (tmp.next != null && tmp.val == tmp.next.val) {
                tmp.next = tmp.next.next;
            }
            tmp = tmp.next;
        }

        return head;
    }

    public static void main(String[] args) {
        new LC83().deleteDuplicates(new ListNode(1));
    }
}
